Planning, Fast And Slow: A Framework For Adaptive Real-Time Safe Trajectory Planning